﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OrderManage
{
    public class Goods 
    {
        public string name { get; }
        public double price { get; set; }

        public Goods(string name,double price)
        {
            this.name = name;
            this.price = price;
        }
        public override string ToString()
        {
            return name+"(单价："+price+")";
        }
        public override bool Equals(object obj)
        {
            Goods g = obj as Goods;
            return g!=null&&g.name.Equals(name)&&g.price==price;
        }
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}

